home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 11
/
Cream of the Crop 11-1.iso
/
utility
/
horst_2.zip
/
INSET.DOC
< prev
next >
Wrap
Text File
|
1995-12-18
|
1KB
|
32 lines
------------------------------------------------------------------------
INSET String input to variable (c) 1994 Horst Schaeffer
------------------------------------------------------------------------
INSET is a simple string input tool for batch files.
Syntax: INSET ["prompt"] varname [/U]
prompt in "double" or 'single' Quotes
varname name of the environment variable
/U convert input to upper case
The optional prompt may include ANSI sequences for color and cursor.
Example (replace "#" with ESC code):
INSET "#[31;40;1mEnter file name: #[0;34;47m" FN
This will produce a bright red on black prompt, and the input will
come blue on white.
The input length is returned as errorlevel.
Example:
INSET "Select Drive " DRV /U
if not errorlevel 1 set DRV=A (no input: default)
if not errorlevel 2 set DRV=%DRV%: (length<2, append ":")
::...
Errorlevel 255 if syntax error or environment space full.
= 26 NOV 1994